﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class KinectEnabling : MonoBehaviour
{
	// Start is called before the first frame update
	public GameObject BodySourceManager;
	public GameObject BodySourceView;
	public GameObject JointPrefab;
	public Transform InitialTrans;

	void Start()
	{
		StartCoroutine(sendSemaphore());

	}
	IEnumerator sendSemaphore()
	{
		yield return new WaitForSeconds(8f);
		GameObject bodySrcMang = Instantiate(BodySourceManager);
		GameObject bodySrcView = Instantiate(BodySourceView);
		bodySrcView.GetComponent<BodySourceView>().BodySourceManager = bodySrcMang;
		bodySrcView.GetComponent<BodySourceView>()._jointObj = JointPrefab;
		bodySrcView.GetComponent<BodySourceView>().initialTrans = InitialTrans;
	}
}
